wayland: Sanity check cursor image size
authorMatthias Clasen <mclasen@redhat.com>
Fri, 27 May 2022 02:28:57 +0000 (22:28 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 27 May 2022 02:29:37 +0000 (22:29 -0400)
commitd603164ec2bd6934e3c7fee93bd19a111b0d3e98
tree0cb426254b1e49368c60d92d7b07130920464352
parent166af489049646a8f1d0ffe3fa3ca7d714c66e68
wayland: Sanity check cursor image size

On Wayland it is a protocol violation to upload buffers with
dimensions that are not an integer multiple of the buffer scale.

Until recently, Mutter did not enforce this. When it started
doing so, some users started seeing crashes in GTK apps because the
cursor theme ended up with e.g. a 15x16 pixel image at scale of 2.

Add a small sanity check for this case.
gdk/wayland/gdkcursor-wayland.c